home *** CD-ROM | disk | FTP | other *** search
/ Experimental BBS Explossion 3 / Experimental BBS Explossion III.iso / games / nhak_src.zip / AMIMENU.C < prev    next >
C/C++ Source or Header  |  1993-03-16  |  6KB  |  164 lines

  1. /*
  2.  *  amimenu.c        (C) Copyright 1989 by Olaf Seibert (KosmoSoft)
  3.  *
  4.  *  Originally by John Toebes.
  5.  */
  6. /* NetHack may be freely redistributed.  See license for details. */
  7.  
  8. #define TEXT(nam,str) \
  9. static struct IntuiText nam = \
  10.   {0,1,JAM2,0,0,0L,(UBYTE*)str,0L}
  11.  
  12.     /* Commands */
  13.     TEXT(T_HELP,  "?   Display help menu");
  14.     TEXT(T_amp,   "&   Explain a command");
  15.     TEXT(T_O,     "O   Set options");
  16.     TEXT(T_SHELL, "!   AmigaDos commands");
  17.     TEXT(T_v,     "v   Version number");
  18.     TEXT(T_CR,    "^R  Redraw screen");
  19.     TEXT(T_CP,    "^P  Repeat last message");
  20.     TEXT(T_Q,     "Q   Quit game");
  21.     TEXT(T_S,     "S   Save the game");
  22.  
  23.     /* Inventory */
  24.     TEXT(T_i,     "i   Inventory");
  25.     TEXT(T_p,     "p   Pay your bill");
  26.     TEXT(T_d,     "d   Drop an object");
  27.     TEXT(T_D,     "D   Drop several things");
  28.     TEXT(T_COMMA, ",   Pickup an object");
  29.     TEXT(T_AT,    "@   Toggle pickup");
  30.     TEXT(T_SLASH, "/   Identify something");
  31.     TEXT(T_C,     "C   Christen a monster");
  32.  
  33.     /* Actions */
  34.     TEXT(T_a,     "a   Apply/use something");
  35.     TEXT(T_e,     "e   Eat something");
  36.     TEXT(T_q,     "q   Quaff a potion");
  37.     TEXT(T_r,     "r   Read scroll/book");
  38.     TEXT(T_t,     "t   Throw/shoot weapon");
  39.     TEXT(T_z,     "z   Zap a wand");
  40.     TEXT(T_Z,     "Z   Cast a spell");
  41.     TEXT(T_HASH,  "#   Extended command");
  42.  
  43.     /* Preparations */
  44.     TEXT(T_w,     "w   Wield a weapon");
  45.     TEXT(T_P,     "P   Put on ring");
  46.     TEXT(T_R,     "R   Remove ring");
  47.     TEXT(T_T,     "T   Take off armor");
  48.     TEXT(T_W,     "W   Wear armor");
  49.     TEXT(T_WPN,   ")   Current weapon");
  50.     TEXT(T_ARMOR, "[   Current armor");
  51.     TEXT(T_RING,  "=   Current rings");
  52.     TEXT(T_AMU,  "\"   Current amulet");
  53.     TEXT(T_TOOL,  "(   Current tools");
  54.  
  55.     /* Movement */
  56.     TEXT(T_o,     "o   Open door");
  57.     TEXT(T_c,     "c   Close door");
  58.     TEXT(T_KICK,  "^D  Kick door");
  59.     TEXT(T_s,     "s   Search");
  60.     TEXT(T_UP,    "<   Go up stairs");
  61.     TEXT(T_DOWN,  ">   Go down stairs");
  62.     TEXT(T_CT,    "^T  Teleport");
  63.     TEXT(T_WAIT,  ".   Wait a moment");
  64.     TEXT(T_E,     "E   Engrave msg on floor");
  65.  
  66. #define IFLAGS ITEMENABLED|ITEMTEXT|HIGHCOMP
  67. #define IDATA(cmd,str,off) 0,off,WDT,9,IFLAGS,0,(APTR)&str,NULL,cmd,0L,0
  68.  
  69. /* Commands */
  70.  
  71. #undef    WDT
  72. #define WDT 184
  73.  
  74. static struct MenuItem cmdsub[] = {
  75.     { &cmdsub[1], IDATA('?', T_HELP,   0) }, /*   Display help */
  76.     { &cmdsub[2], IDATA('&', T_amp,   10) }, /*   Explain a command */
  77.     { &cmdsub[3], IDATA('O', T_O,     20) }, /*   Set options */
  78.     { &cmdsub[4], IDATA('!', T_SHELL, 30) }, /*   AmigaDos commands */
  79.     { &cmdsub[5], IDATA('v', T_v,     40) }, /*   Version number */
  80.     { &cmdsub[6], IDATA(022, T_CR,    50) }, /*R  Redraw screen */
  81.     { &cmdsub[7], IDATA(020 ,T_CP,    60) }, /*P  Repeat last message */
  82.     { &cmdsub[8], IDATA('Q', T_Q,     70) }, /*   Quit game */
  83.     { NULL,      IDATA('S', T_S,     80) }, /*   Save the game */
  84. };
  85.  
  86. /* Inventory */
  87.  
  88. #undef    WDT
  89. #define WDT 184
  90.  
  91. static struct MenuItem invsub[] = {
  92.     { &invsub[1], IDATA('i', T_i,      0) }, /*   Inventory */
  93.     { &invsub[2], IDATA('p', T_p,     10) }, /*   Pay your bill */
  94.     { &invsub[3], IDATA('d', T_d,     20) }, /*   Drop an object */
  95.     { &invsub[4], IDATA('D', T_D,     30) }, /*   Drop several things */
  96.     { &invsub[5], IDATA(',', T_COMMA, 40) }, /*   Pickup an object */
  97.     { &invsub[6], IDATA('/', T_SLASH, 50) }, /*   Identify something */
  98.     { NULL,      IDATA('C', T_C,     60) }, /*   Christen a monster */
  99. };
  100.  
  101. /* Actions */
  102.  
  103. #undef    WDT
  104. #define WDT 184
  105.  
  106. static struct MenuItem actsub[] = {
  107.     { &actsub[1], IDATA('a', T_a,     0) }, /*   Apply/use something */
  108.     { &actsub[2], IDATA('e', T_e,    10) }, /*   Eat something */
  109.     { &actsub[3], IDATA('q', T_q,    20) }, /*   Quaff a potion */
  110.     { &actsub[4], IDATA('r', T_r,    30) }, /*   Read a scroll/spellbook */
  111.     { &actsub[5], IDATA('t', T_t,    40) }, /*   Throw/shoot weapon */
  112.     { &actsub[6], IDATA('z', T_z,    50) }, /*   Zap a wand */
  113.     { &actsub[7], IDATA('Z', T_Z,    60) }, /*   Cast a spell */
  114.     { NULL    , IDATA('#', T_HASH, 70) }, /*   Extended command */
  115. };
  116.  
  117. /* Preparations */
  118.  
  119. #undef    WDT
  120. #define WDT 144
  121.  
  122. static struct MenuItem armsub[] = {
  123.     { &armsub[1], IDATA('w', T_w,      0) }, /*   Wield a weapon */
  124.     { &armsub[2], IDATA('R', T_R,     10) }, /*   Remove ring */
  125.     { &armsub[3], IDATA('P', T_P,     20) }, /*   Put on ring */
  126.     { &armsub[4], IDATA('T', T_T,     30) }, /*   Take off armor */
  127.     { &armsub[5], IDATA('W', T_W,     40) }, /*   Wear armor */
  128.     { &armsub[6], IDATA(')', T_WPN,   50) }, /*   Current weapon */
  129.     { &armsub[7], IDATA('[', T_ARMOR, 60) }, /*   Current armor */
  130.     { &armsub[8], IDATA('=', T_RING,  70) }, /*   Current rings */
  131.     { &armsub[9], IDATA('"', T_AMU,   80) }, /*   Current amulet */
  132.     { NULL    , IDATA('(', T_TOOL,  90) }, /*   Current tools */
  133. };
  134.  
  135. /* Movement */
  136.  
  137. #undef    WDT
  138. #define WDT 192
  139.  
  140. static struct MenuItem movsub[] = {
  141.     { &movsub[1], IDATA('o', T_o,     0) }, /*   Open door */
  142.     { &movsub[2], IDATA('c', T_c,    10) }, /*   Close door */
  143.     { &movsub[3], IDATA(004, T_KICK, 20) }, /*D  Kick door */
  144.     { &movsub[4], IDATA('s', T_s,    30) }, /*   Search */
  145.     { &movsub[5], IDATA('<', T_UP,   40) }, /*   Go up stairs */
  146.     { &movsub[6], IDATA('>', T_DOWN, 50) }, /*   Go down stairs */
  147.     { &movsub[7], IDATA(024, T_CT,   60) }, /*T  Teleport */
  148.     { &movsub[8], IDATA('.', T_WAIT, 70) }, /*   Wait a moment */
  149.     { NULL    , IDATA('E', T_E,    80) }, /*   Engrave msg on floor */
  150. };
  151.  
  152. /* Menustrip */
  153.  
  154. /* Width = #letters * 8 + 8 + 10 */
  155.  
  156. struct Menu HackMenu[] = {
  157.    { &HackMenu[1], 10,0, 72,0,MENUENABLED,"Commands",     &cmdsub[0] }, /*8*/
  158.    { &HackMenu[2], 92,0, 80,0,MENUENABLED,"Inventory",    &invsub[0] }, /*9*/
  159.    { &HackMenu[3],182,0, 64,0,MENUENABLED,"Actions",      &actsub[0] }, /*7*/
  160.    { &HackMenu[4],256,0,104,0,MENUENABLED,"Preparations", &armsub[0] }, /*12*/
  161.    { NULL,      370,0, 72,0,MENUENABLED,"Movement",     &movsub[0] }, /*8*/
  162. };
  163.  
  164.